//同时发送异步代码的次数
let ajaxTimes = 0;

export const request = (params) => {

  //定义公共的url
  const baseUrl = "http://192.168.174.1:8080";
  return new Promise((resolve, reject) => {
    wx.request({
      ...params,
      url: baseUrl + params.url,
      success: (result) => {
        resolve(result.data);
      },
      fail: (err) => {
        reject(err);
      },
      complete: () => {


      }
    });
  })

}



